package cn.z2huo.knowledge.concurrency.aqs;

import java.util.concurrent.locks.Lock;

/**
 * <p>
 *
 * @author z2huo
 */
class IncrementData {

    public static int sum = 0;

    public static void increase() {
        sum++;
    }

    public static void lockAndFastIncrease(Lock lock) {
        lock.lock();
        try {
            sum++;
        } finally {
            lock.unlock();
        }
    }

}
